package drds.binlog.parse.support;

import java.net.InetSocketAddress;

/**
 * 数据库认证信息
 */
public class AuthenticationInfo
{

    private InetSocketAddress inetSocketAddress;            // 主库信息
    private String username;           // 帐号
    private String password;           // 密码
    private String defaultDatabaseName; // 默认链接的数据库

    public AuthenticationInfo()
    {
        super();
    }

    public AuthenticationInfo(InetSocketAddress inetSocketAddress, String username, String password)
    {
        this(inetSocketAddress, username, password, "");
    }

    public AuthenticationInfo(InetSocketAddress inetSocketAddress, String username, String password, String defaultDatabaseName)
    {
        this.inetSocketAddress = inetSocketAddress;
        this.username = username;
        this.password = password;
        this.defaultDatabaseName = defaultDatabaseName;
    }

    public InetSocketAddress getInetSocketAddress()
    {
        return inetSocketAddress;
    }

    public void setInetSocketAddress(InetSocketAddress inetSocketAddress)
    {
        this.inetSocketAddress = inetSocketAddress;
    }

    public String getUsername()
    {
        return username;
    }

    public void setUsername(String username)
    {
        this.username = username;
    }

    public String getPassword()
    {
        return password;
    }

    public void setPassword(String password)
    {
        this.password = password;
    }

    public String getDefaultDatabaseName()
    {
        return defaultDatabaseName;
    }

    public void setDefaultDatabaseName(String defaultDatabaseName)
    {
        this.defaultDatabaseName = defaultDatabaseName;
    }


}
